<template>
  <el-dialog title="提示" v-model="dialogVisible" width="30%" center>
    <el-button @click="dialogVisible = false">取 消</el-button>
  </el-dialog>
</template>
<script lang="ts" setup>
import { defineProps, computed } from 'vue'
import { ElDialog, ElButton } from 'element-plus'

const prop = defineProps<{
  dialogVisible: boolean
}>()

const emit = defineEmits<{
  'update:dialogVisible': [boolean]
}>()

const dialogVisible = computed({
  get: () => prop.dialogVisible,
  set: (value: boolean) => emit('update:dialogVisible', value),
})
</script>
